bitkeeper revision 1.695 (4017ff70oJV8517inpGbN1CixN6csw)
authorkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Wed, 28 Jan 2004 18:29:04 +0000 (18:29 +0000)
committerkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Wed, 28 Jan 2004 18:29:04 +0000 (18:29 +0000)
Many files:
  Clean up compile warnings. Added stricter gcc options for Xen build.

29 files changed:
extras/mini-os/Makefile
extras/mini-os/lib/malloc.c
xen/arch/i386/Rules.mk
xen/arch/i386/acpitable.c
xen/arch/i386/io_apic.c
xen/arch/i386/setup.c
xen/drivers/block/cciss.c
xen/drivers/cdrom/cdrom.c
xen/drivers/char/xen_kbd.c
xen/drivers/ide/ide-geometry.c
xen/drivers/message/fusion/mptscsih.c
xen/drivers/net/e100/e100_main.c
xen/drivers/net/tg3.c
xen/drivers/net/tulip/tulip.h
xen/drivers/pci/pci.c
xen/drivers/scsi/BusLogic.h
xen/drivers/scsi/aic7xxx/aic79xx_osm.c
xen/drivers/scsi/aic7xxx/aic79xx_osm.h
xen/drivers/scsi/constants.h
xen/drivers/scsi/megaraid.c
xen/drivers/scsi/megaraid.h
xen/drivers/scsi/scsi.c
xen/drivers/scsi/scsi_obsolete.c
xen/drivers/scsi/scsi_syms.c
xen/drivers/scsi/sym53c8xx_2/sym53c8xx.h
xen/include/asm-i386/domain_page.h
xen/include/asm-i386/mpspec.h
xen/include/asm-i386/smp.h
xen/include/scsi/scsicam.h

index 2e4d08e9d0976cc6a10b4748ff1662ad4e18fad5..41d6785c00ddc6f00083414d1b223396d9a9d9e5 100644 (file)
@@ -5,9 +5,7 @@ LD := ld
 # Linker should relocate monitor to this address
 MONITOR_BASE := 0xE0100000
 
-# NB. '-Wstrict-prototypes -Wredundant-decls -Wpointer-arith -Winline -ansi'
-#     might all be okay to add to Xen. '-Wnested-externs' is a maybe.
-#     '-Wcast-qual' is evil.
+# NB. '-Wcast-qual' is nasty, so I omitted it.
 CFLAGS := -fno-builtin -O3 -Wall -Ih/ -Wredundant-decls
 CFLAGS += -Wstrict-prototypes -Wnested-externs -Wpointer-arith -Winline -ansi
 
index 68af1581cb2a0df5748e5f7b154e343c26e78d5e..e9169b11dc0f30f1e53fc785c4144a30b77c7e1c 100644 (file)
@@ -2637,17 +2637,12 @@ static void malloc_init_state(av) mstate av;
    Other internal utilities operating on mstates
 */
 
-#if __STD_C
 static Void_t*  sYSMALLOc(INTERNAL_SIZE_T, mstate);
+#ifndef MORECORE_CANNOT_TRIM
 static int      sYSTRIm(size_t, mstate);
+#endif
 static void     malloc_consolidate(mstate);
 static Void_t** iALLOc(size_t, size_t*, int, Void_t**);
-#else
-static Void_t*  sYSMALLOc();
-static int      sYSTRIm();
-static void     malloc_consolidate();
-static Void_t** iALLOc();
-#endif
 
 /*
   Debugging support
@@ -3420,6 +3415,7 @@ static Void_t* sYSMALLOc(nb, av) INTERNAL_SIZE_T nb; mstate av;
 
 
 
+#ifndef MORECORE_CANNOT_TRIM
 /*
   sYSTRIm is an inverse of sorts to sYSMALLOc.  It gives memory back
   to the system (via negative arguments to sbrk) if there is unused
@@ -3485,6 +3481,7 @@ static int sYSTRIm(pad, av) size_t pad; mstate av;
   }
   return 0;
 }
+#endif
 
 /*
   ------------------------------ malloc ------------------------------
index 2f57ce536ec75bc6153aeb40d1e2f6996bdc6c85..56f5932b6d58f1b74db1c2892c663c21f956a783 100644 (file)
@@ -11,6 +11,7 @@ CFLAGS  := -nostdinc -fno-builtin -fno-common -fno-strict-aliasing
 CFLAGS  += -iwithprefix include -O3 -Wall -DMONITOR_BASE=$(MONITOR_BASE)
 CFLAGS  += -fomit-frame-pointer -I$(BASEDIR)/include -D__KERNEL__ -DNDEBUG
 #CFLAGS  += -fomit-frame-pointer -I$(BASEDIR)/include -D__KERNEL__
+CFLAGS  += -Wno-pointer-arith -Wredundant-decls
 LDFLAGS := -T xeno.lds -N
 
 
index a24050bb8b4f3890bb32ecb5a5a4e4d16317a646..304f0e3a63cb572c681db302c9eb7cadfa084db3 100644 (file)
@@ -31,7 +31,6 @@
 #include <xeno/kernel.h>
 #include <xeno/init.h>
 #include <xeno/types.h>
-/*#include <xeno/stddef.h>*/
 #include <xeno/slab.h>
 #include <xeno/pci.h>
 #include <asm/mpspec.h>
@@ -39,7 +38,7 @@
 #include <asm/apic.h>
 #include <asm/apicdef.h>
 #include <asm/page.h>
-/*#include <asm/pgtable.h>*/
+#include <asm/io_apic.h>
 
 #ifdef CONFIG_X86_IO_APIC
 
index 7369966dd847969cec78152213152ed3423840a9..8401a1612a552fa7808f6555b167d9656cd49718 100644 (file)
@@ -689,11 +689,6 @@ next:
         /* XXX Skip the Linux/BSD fast-trap vector! XXX */
         if (current_vector == 0x80) goto next;
 
-#if 0
-       if (current_vector == SYSCALL_VECTOR)
-               goto next;
-#endif
-
        if (current_vector > FIRST_SYSTEM_VECTOR) {
                offset++;
                current_vector = FIRST_DEVICE_VECTOR + offset;
@@ -707,8 +702,49 @@ next:
 }
 
 extern void (*interrupt[NR_IRQS])(void);
-static struct hw_interrupt_type ioapic_level_irq_type;
-static struct hw_interrupt_type ioapic_edge_irq_type;
+
+/*
+ * Level and edge triggered IO-APIC interrupts need different handling,
+ * so we use two separate IRQ descriptors. Edge triggered IRQs can be
+ * handled with the level-triggered descriptor, but that one has slightly
+ * more overhead. Level-triggered interrupts cannot be handled with the
+ * edge-triggered handler, without risking IRQ storms and other ugly
+ * races.
+ */
+
+static unsigned int startup_edge_ioapic_irq(unsigned int irq);
+#define shutdown_edge_ioapic_irq  disable_edge_ioapic_irq
+#define enable_edge_ioapic_irq    unmask_IO_APIC_irq
+static void disable_edge_ioapic_irq (unsigned int irq);
+static void ack_edge_ioapic_irq(unsigned int irq);
+static void end_edge_ioapic_irq (unsigned int i);
+static struct hw_interrupt_type ioapic_edge_irq_type = {
+       "IO-APIC-edge",
+       startup_edge_ioapic_irq,
+       shutdown_edge_ioapic_irq,
+       enable_edge_ioapic_irq,
+       disable_edge_ioapic_irq,
+       ack_edge_ioapic_irq,
+       end_edge_ioapic_irq,
+       set_ioapic_affinity,
+};
+
+static unsigned int startup_level_ioapic_irq (unsigned int irq);
+#define shutdown_level_ioapic_irq mask_IO_APIC_irq
+#define enable_level_ioapic_irq   unmask_IO_APIC_irq
+#define disable_level_ioapic_irq  mask_IO_APIC_irq
+static void mask_and_ack_level_ioapic_irq (unsigned int irq);
+static void end_level_ioapic_irq (unsigned int irq);
+static struct hw_interrupt_type ioapic_level_irq_type = {
+       "IO-APIC-level",
+       startup_level_ioapic_irq,
+       shutdown_level_ioapic_irq,
+       enable_level_ioapic_irq,
+       disable_level_ioapic_irq,
+       mask_and_ack_level_ioapic_irq,
+       end_level_ioapic_irq,
+       set_ioapic_affinity,
+};
 
 void __init setup_IO_APIC_irqs(void)
 {
@@ -1262,20 +1298,6 @@ static int __init timer_irq_works(void)
        return 0;
 }
 
-/*
- * In the SMP+IOAPIC case it might happen that there are an unspecified
- * number of pending IRQ events unhandled. These cases are very rare,
- * so we 'resend' these IRQs via IPIs, to the same CPU. It's much
- * better to do it this way as thus we do not have to be aware of
- * 'pending' interrupts in the IRQ path, except at this point.
- */
-/*
- * Edge triggered needs to resend any interrupt
- * that was delayed but this is now handled in the device
- * independent code.
- */
-#define enable_edge_ioapic_irq unmask_IO_APIC_irq
-
 static void disable_edge_ioapic_irq (unsigned int irq) { /* nothing */ }
 
 /*
@@ -1305,8 +1327,6 @@ static unsigned int startup_edge_ioapic_irq(unsigned int irq)
        return was_pending;
 }
 
-#define shutdown_edge_ioapic_irq       disable_edge_ioapic_irq
-
 /*
  * Once we have recorded IRQ_PENDING already, we can mask the
  * interrupt for real. This prevents IRQ storms from unhandled
@@ -1345,10 +1365,6 @@ static unsigned int startup_level_ioapic_irq (unsigned int irq)
        return 0; /* don't check for pending */
 }
 
-#define shutdown_level_ioapic_irq      mask_IO_APIC_irq
-#define enable_level_ioapic_irq                unmask_IO_APIC_irq
-#define disable_level_ioapic_irq       mask_IO_APIC_irq
-
 static void end_level_ioapic_irq (unsigned int irq)
 {
        unsigned long v;
@@ -1412,37 +1428,6 @@ static void end_level_ioapic_irq (unsigned int irq)
 
 static void mask_and_ack_level_ioapic_irq (unsigned int irq) { /* nothing */ }
 
-/*
- * Level and edge triggered IO-APIC interrupts need different handling,
- * so we use two separate IRQ descriptors. Edge triggered IRQs can be
- * handled with the level-triggered descriptor, but that one has slightly
- * more overhead. Level-triggered interrupts cannot be handled with the
- * edge-triggered handler, without risking IRQ storms and other ugly
- * races.
- */
-
-static struct hw_interrupt_type ioapic_edge_irq_type = {
-       "IO-APIC-edge",
-       startup_edge_ioapic_irq,
-       shutdown_edge_ioapic_irq,
-       enable_edge_ioapic_irq,
-       disable_edge_ioapic_irq,
-       ack_edge_ioapic_irq,
-       end_edge_ioapic_irq,
-       set_ioapic_affinity,
-};
-
-static struct hw_interrupt_type ioapic_level_irq_type = {
-       "IO-APIC-level",
-       startup_level_ioapic_irq,
-       shutdown_level_ioapic_irq,
-       enable_level_ioapic_irq,
-       disable_level_ioapic_irq,
-       mask_and_ack_level_ioapic_irq,
-       end_level_ioapic_irq,
-       set_ioapic_affinity,
-};
-
 static inline void init_IO_APIC_traps(void)
 {
        int irq;
index 90d3b8fca04ca15558f7dadb23fe7cd711013a3f..13298f7385ac1207e0f5a1a56574d870cb75f81f 100644 (file)
@@ -308,7 +308,6 @@ void __init start_of_day(void)
     extern void trap_init(void);
     extern void init_IRQ(void);
     extern void time_init(void);
-    extern void softirq_init(void);
     extern void timer_bh(void);
     extern void init_timervecs(void);
     extern void ac_timer_init(void);
index a9b5193394da68c13a4a2176c9c6b8098e723581..833fcaa54a396968eafd3c73089f2ec849769f11 100644 (file)
 #include <xeno/slab.h>
 #include <xeno/delay.h>
 #include <xeno/major.h>
-//#include <xeno/fs.h>
 #include <xeno/blkpg.h>
 #include <xeno/interrupt.h>
 #include <xeno/timer.h>
-//#include <xeno/proc_fs.h>
 #include <xeno/init.h> 
 #include <xeno/hdreg.h>
 #include <xeno/spinlock.h>
 #include <asm/uaccess.h>
 #include <asm/io.h>
-//#include <xeno/smp_lock.h>
 
 #include <xeno/blk.h>
 #include <xeno/blkdev.h>
@@ -60,7 +57,6 @@ MODULE_LICENSE("GPL");
 
 #include "cciss_cmd.h"
 #include "cciss.h"
-//#include <xeno/cciss_ioctl.h>
 
 /* define the PCI info for the cards we can control */
 const struct pci_device_id cciss_pci_device_id[] = {
@@ -137,7 +133,6 @@ static u32 heartbeat_timer = 0;
 
 static ctlr_info_t *hba[MAX_CTLR];
 static int map_major_to_ctlr[MAX_BLKDEV] = {0}; /* gets ctlr num from maj num */
-//static struct proc_dir_entry *proc_cciss;
 
 static void do_cciss_request(request_queue_t *q);
 static int cciss_open(struct inode *inode, struct file *filep);
@@ -147,9 +142,11 @@ static int cciss_ioctl(struct inode *inode, struct file *filep,
 
 static int revalidate_logvol(kdev_t dev, int maxusage);
 static int frevalidate_logvol(kdev_t dev);
+#if 0
 static int deregister_disk(int ctlr, int logvol);
 static int register_new_disk(int cltr, int opened_vol, __u64 requested_lun);
 static int cciss_rescan_disk(int cltr, int logvol);
+#endif
 
 static void cciss_getgeometry(int cntl_num);
 
@@ -173,7 +170,6 @@ static void cciss_procinit(int i) {}
 
 
 static struct block_device_operations cciss_fops  = {
-       //owner:                        THIS_MODULE,
        open:                   cciss_open, 
        release:                cciss_release,
         ioctl:                 cciss_ioctl,
@@ -503,9 +499,11 @@ static int cciss_release(struct inode *inode, struct file *filep)
 static int cciss_ioctl(struct inode *inode, struct file *filep, 
                unsigned int cmd, unsigned long arg)
 {
+#if 0
        //int ctlr = map_major_to_ctlr[MAJOR(inode->i_rdev)];
 
        //int dsk  = MINOR(inode->i_rdev) >> NWD_SHIFT;
+#endif
 
 printk(KERN_ALERT "cciss_ioctl: Called BUT NOT SUPPORTED cmd=%x %lx\n", cmd, arg);
 
@@ -1101,6 +1099,7 @@ static int frevalidate_logvol(kdev_t dev)
 #endif /* CCISS_DEBUG */ 
        return revalidate_logvol(dev, 0);
 }
+#if 0
 static int deregister_disk(int ctlr, int logvol)
 {
        unsigned long flags;
@@ -1781,6 +1780,8 @@ static int cciss_rescan_disk(int ctlr, int logvol)
        kfree(inq_buff);
        return 0;
 }
+#endif
+
 /*
  *   Wait polling for a command to complete.
  *   The memory mapped FIFO is polled for the completion.
@@ -3136,7 +3137,9 @@ static int __init cciss_init_one(struct pci_dev *pdev,
        request_queue_t *q;
        int i;
        int j;
+#if 0
        int rc;
+#endif
 
        printk(KERN_DEBUG "cciss: Device 0x%x has been found at"
                        " bus %d dev %d func %d\n",
index 8bf93cc5c7186b83bfd8364505345a9ae178ccde..0df4f589ad735d36c716f45fb8b4ed23a47a0ac0 100644 (file)
@@ -318,9 +318,6 @@ static void sanitize_format(union cdrom_addr *addr,
 static int mmc_ioctl(struct cdrom_device_info *cdi, unsigned int cmd,
                     unsigned long arg);
 
-int cdrom_get_last_written(kdev_t dev, long *last_written);
-int cdrom_get_next_writable(kdev_t dev, long *next_writable);
-
 #ifdef CONFIG_SYSCTL
 static void cdrom_sysctl_register(void);
 #endif /* CONFIG_SYSCTL */ 
index 2da604d9725fdc1205aa1d6be9cb433d452c5ee6..43260506edd44ad1c3e38bccd15cbd12c4ce2eb5 100644 (file)
@@ -183,7 +183,7 @@ long do_kbd_op(unsigned char op, unsigned char val)
 
 static void keyboard_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
-    unsigned char status, scancode;
+    unsigned char status=0, scancode;
     unsigned int work = 1000;
     unsigned long cpu_mask = 0, flags;
     struct task_struct *p = CONSOLE_OWNER;
index 22428288b658a86ab929f443580f1d6d95f036a9..0e28927e70476a2210048eeb3ecf3f2258aff583 100644 (file)
@@ -89,9 +89,6 @@ void probe_cmos_for_drives (ide_hwif_t *hwif)
 
 #if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
 
-extern ide_drive_t * get_info_ptr(kdev_t);
-extern unsigned long current_capacity (ide_drive_t *);
-
 /*
  * If heads is nonzero: find a translation with this many heads and S=63.
  * Otherwise: find out how OnTrack Disk Manager would translate the disk.
index 5a8a78ad33802d31c0d01c403d8441828e6be163..5094d811d2da4317722b66699962fb3f7465addf 100644 (file)
@@ -204,7 +204,7 @@ static int  mptscsih_doDv(MPT_SCSI_HOST *hd, int channel, int target);
 static void    mptscsih_dv_parms(MPT_SCSI_HOST *hd, DVPARAMETERS *dv,void *pPage);
 static void    mptscsih_fillbuf(char *buffer, int size, int index, int width);
 #endif
-static int     mptscsih_setup(char *str);
+/*static int   mptscsih_setup(char *str);*/
 static int     mptscsih_halt(struct notifier_block *nb, ulong event, void *buf);
 
 #if XENO_KILLED
@@ -7853,6 +7853,7 @@ mptscsih_fillbuf(char *buffer, int size, int index, int width)
 }
 #endif /* ~MPTSCSIH_DISABLE_DOMAIN_VALIDATION */
 
+#if 0
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
 /* Commandline Parsing routines and defines.
  *
@@ -7943,6 +7944,6 @@ __init mptscsih_setup(char *str)
        }
        return 1;
 }
-
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
+#endif
 
index fe3d905dc99f05fd0dbc39e14f3591cc150a247d..b2870e6c5b689b40519b9ffa9c848365407f1f88 100644 (file)
@@ -143,9 +143,8 @@ static char *test_strings[] = {
 };
 #endif
 
-static int e100_ethtool_led_blink(struct net_device *, struct ifreq *);
-
 #if 0
+static int e100_ethtool_led_blink(struct net_device *, struct ifreq *);
 static int e100_mii_ioctl(struct net_device *, struct ifreq *, int);
 #endif
 
@@ -3584,6 +3583,7 @@ e100_ethtool_eeprom(struct net_device *dev, struct ifreq *ifr)
 }
 #endif
 
+#if 0
 #define E100_BLINK_INTERVAL    (HZ/4)
 /**
  * e100_led_control
@@ -3666,6 +3666,7 @@ e100_ethtool_led_blink(struct net_device *dev, struct ifreq *ifr)
 
        return 0;
 }
+#endif
 
 static inline int __devinit
 e100_10BaseT_adapter(struct e100_private *bdp)
index 82d56cc5626d5e86eba5a8b11c8674d17950c4e1..8b36e4d29b60b7f2a1600bb08468b66004cd3e66 100644 (file)
@@ -5868,6 +5868,8 @@ static void tg3_set_rx_mode(struct net_device *dev)
        spin_unlock_irq(&tp->lock);
 }
 
+#ifdef ETHTOOL
+
 #define TG3_REGDUMP_LEN                (32 * 1024)
 
 static int tg3_get_regs_len(struct net_device *dev)
@@ -5939,6 +5941,8 @@ do {      p = orig_p + (reg);     \
        spin_unlock_irq(&tp->lock);
 }
 
+#endif /* ETHTOOL */
+
 static int tg3_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
 {
        struct tg3 *tp = dev->priv;
@@ -6088,6 +6092,8 @@ static int tg3_nway_reset(struct net_device *dev)
        return r;
 }
   
+#ifdef ETHTOOL
+
 static void tg3_get_ringparam(struct net_device *dev, struct ethtool_ringparam *ering)
 {
        struct tg3 *tp = dev->priv;
@@ -6170,6 +6176,8 @@ static int tg3_set_pauseparam(struct net_device *dev, struct ethtool_pauseparam
        return 0;
 }
   
+#endif /* ETHTOOL */
+
 static u32 tg3_get_rx_csum(struct net_device *dev)
 {
        struct tg3 *tp = dev->priv;
index 905258e4e63252a7113a2e7a1a8e71f19a58d21b..ca519fe8c009c699cb0baa7a84697fc30764afd5 100644 (file)
@@ -416,7 +416,6 @@ void t21142_lnk_change(struct net_device *dev, int csr5);
 void pnic2_lnk_change(struct net_device *dev, int csr5);
 void pnic2_timer(unsigned long data);
 void pnic2_start_nway(struct net_device *dev);
-void pnic2_lnk_change(struct net_device *dev, int csr5);
 
 /* eeprom.c */
 void tulip_parse_eeprom(struct net_device *dev);
index 2692435463f0ccdcbbce093a5cb265a29eb36e30..30b18ed96cdbee74d356257208ea12e2457e5211 100644 (file)
@@ -1261,8 +1261,6 @@ struct pci_bus * __devinit pci_add_new_bus(struct pci_bus *parent, struct pci_de
        return child;
 }
 
-unsigned int __devinit pci_do_scan_bus(struct pci_bus *bus);
-
 /*
  * If it's a bridge, configure it and scan the bus behind it.
  * For CardBus bridges, we don't scan behind as the devices will
index 9f9d5498511317c145d8800c455f246cda077813..b0e1bd755f348333f2e409a9e80b2d9b63c2f86b 100644 (file)
@@ -1801,8 +1801,6 @@ static void BusLogic_ReleaseResources(BusLogic_HostAdapter_T *) __init;
 static boolean BusLogic_TargetDeviceInquiry(BusLogic_HostAdapter_T *) __init;
 static void BusLogic_InitializeHostStructure(BusLogic_HostAdapter_T *,
                                             SCSI_Host_T *) __init;
-int BusLogic_DetectHostAdapter(SCSI_Host_Template_T *) __init;
-int BusLogic_ReleaseHostAdapter(SCSI_Host_T *) __init;
 static boolean BusLogic_ParseKeyword(char **, char *) __init;
 #if 0 /* XEN */
 static int BusLogic_ParseDriverOptions(char *) __init;
index 8aa7c01befb2b89df609fce8409ab7bc68bdf760..a69fbbdbecebf844b62f3196affb31f8d3f62999 100644 (file)
@@ -376,8 +376,8 @@ static void ahd_linux_dev_timed_unfreeze(u_long arg);
 /* SAE */
 #if XENO_KILLED
 static void ahd_linux_sem_timeout(u_long arg);
-#endif
 static int  ahd_linux_queue_recovery_cmd(Scsi_Cmnd *cmd, scb_flag flag);
+#endif
 
 static void ahd_linux_initialize_scsi_bus(struct ahd_softc *ahd);
 static void ahd_linux_select_queue_depth(struct Scsi_Host *host,
@@ -2458,7 +2458,6 @@ ahd_linux_sem_timeout(u_long arg)
        sem = (struct semaphore *)arg;
        up(sem);
 }
-#endif
 
 static int
 ahd_linux_queue_recovery_cmd(Scsi_Cmnd *cmd, scb_flag flag)
@@ -2733,6 +2732,7 @@ done:
        spin_lock_irq(&io_request_lock);
        return (retval);
 }
+#endif /* XENO_KILLED */
 
 static void
 ahd_linux_dev_timed_unfreeze(u_long arg)
index b7686f19938546a44ecfade4e405704e9ff162f7..b739b8c091de5a1e75c74d68b11d6f8ac51ae2fb 100644 (file)
@@ -42,6 +42,7 @@
 #ifndef _AIC79XX_LINUX_H_
 #define _AIC79XX_LINUX_H_
 
+#include <xeno/config.h>
 #include <xeno/types.h>
 #include <xeno/blk.h>
 #include <xeno/blkdev.h>
@@ -1123,8 +1124,11 @@ ahd_flush_device_writes(struct ahd_softc *ahd)
 /*
  * Always "return" 0 for success.
  */
-#define ahd_pci_set_dma_mask(dev_softc, mask)  \
-       (((dev_softc)->dma_mask = mask) && 0)
+static inline int ahd_pci_set_dma_mask(struct pci_dev *dev_softc, u64 mask)
+{
+    dev_softc->dma_mask = mask;
+    return 0;
+}
 #endif
 /*********************** Transaction Access Wrappers **************************/
 static __inline void ahd_set_transaction_status(struct scb *, uint32_t);
index e10527ea5e4a9927d3f05d52ec9a0545a9ae80ff..6de2644cc32cd827e47945981361c9c67add9b4f 100644 (file)
@@ -1,6 +1,5 @@
 #ifndef _CONSTANTS_H
 #define _CONSTANTS_H
 extern int print_msg(unsigned char *);
-extern void print_status(int);
 extern void print_Scsi_Cmnd (Scsi_Cmnd *);
 #endif /* def _CONSTANTS_H */
index 44e9aa59f6b1f4f69d8824f85737943f2d8955fb..89d9cec74457286a886a0f9fad029fe326b7ed4e 100644 (file)
@@ -5407,7 +5407,7 @@ mega_del_logdrv(mega_host_config *this_hba, int logdrv)
 #endif
 }
 
-
+#if XENO_KILLED_DELLOGDRV
 static int
 mega_do_del_logdrv(mega_host_config *this_hba, int logdrv)
 {
@@ -5442,6 +5442,7 @@ mega_do_del_logdrv(mega_host_config *this_hba, int logdrv)
 
        return rval;
 }
+#endif
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)
 void *
index cb8c9aba9ed16cbf96efeac175c43804702e0e80..e55702bd1f6d774a0461f3d691a1c3e8133fd4a4 100644 (file)
@@ -1036,7 +1036,7 @@ static void mega_get_boot_drv(mega_host_config *);
 static int mega_get_ldrv_num(mega_host_config *, Scsi_Cmnd *, int);
 static int mega_support_random_del(mega_host_config *);
 static int mega_del_logdrv(mega_host_config *, int);
-static int mega_do_del_logdrv(mega_host_config *, int);
+/*static int mega_do_del_logdrv(mega_host_config *, int);*/
 
 #endif
 
index ed869dd6aa807057f061c4e0b8ac05d5b666202a..d19d16b7629bcbfaaaabc2609edee5948aaad185 100644 (file)
@@ -147,12 +147,6 @@ const char *const scsi_device_types[MAX_SCSI_DEVICE_CODE] =
        "Enclosure        ",
 };
 
-/* 
- * Function prototypes.
- */
-extern void scsi_times_out(Scsi_Cmnd * SCpnt);
-void scsi_build_commandblocks(Scsi_Device * SDpnt);
-
 /*
  * These are the interface to the old error handling code.  It should go away
  * someday soon.
index a9f7db43a310b08a727935fe5a095d68d645d3c4..d5309d2669c2ab24e03c8574e5cf6c773ce51b7a 100644 (file)
@@ -85,8 +85,6 @@ extern void scsi_old_done(Scsi_Cmnd * SCpnt);
 int update_timeout(Scsi_Cmnd *, int);
 extern void scsi_old_times_out(Scsi_Cmnd * SCpnt);
 
-extern int scsi_dispatch_cmd(Scsi_Cmnd * SCpnt);
-
 #define SCSI_BLOCK(HOST) (HOST->can_queue && HOST->host_busy >= HOST->can_queue)
 
 static unsigned char generic_sense[6] =
index 82b23e84ce60a8c6ae6b84fd52575714ab9ef97a..efea5288c06bb9aa49d56dfa5472dad3aa2f14ae 100644 (file)
@@ -99,7 +99,5 @@ EXPORT_SYMBOL(scsi_device_types);
 /*
  * Externalize timers so that HBAs can safely start/restart commands.
  */
-extern void scsi_add_timer(Scsi_Cmnd *, int, void ((*) (Scsi_Cmnd *)));
-extern int scsi_delete_timer(Scsi_Cmnd *);
 EXPORT_SYMBOL(scsi_add_timer);
 EXPORT_SYMBOL(scsi_delete_timer);
index 73bd0ed4f919698a2b07e386918afce8307c2944..8b649547c8fb92c6aeacad2ec8d25919431955b1 100644 (file)
@@ -181,7 +181,7 @@ int sym53c8xx_release(struct Scsi_Host *);
 /*
  *  These options are not tunable from 'make config'
  */
-#if 1
+#if 0
 #define        SYM_LINUX_PROC_INFO_SUPPORT
 #define SYM_LINUX_BOOT_COMMAND_LINE_SUPPORT
 #define SYM_LINUX_USER_COMMAND_SUPPORT
index e91689c8675145afdf6df14c73c7954389905fa0..1d38d8b310700391e74d8a735ab44a60f5ecf280 100644 (file)
@@ -4,6 +4,9 @@
  * Allow temporary mapping of domain page frames into Xen space.
  */
 
+#ifndef __ASM_DOMAIN_PAGE_H__
+#define __ASM_DOMAIN_PAGE_H__
+
 #include <xeno/config.h>
 #include <xeno/sched.h>
 
@@ -23,21 +26,4 @@ extern void *map_domain_mem(unsigned long pa);
  */
 extern void unmap_domain_mem(void *va);
 
-#if 0
-#define MAPCACHE_HASH(_pfn)     ((_pfn) & (MAPCACHE_ENTRIES-1))
-static inline void *map_domain_mem(unsigned long pa)
-{
-    unsigned long pfn = pa >> PAGE_SHIFT;
-    unsigned long hash = MAPCACHE_HASH(pfn);
-    unsigned long *pent = mapcache[smp_processor_id()] + hash;
-    void *va = (void *)(MAPCACHE_VIRT_START + 
-                        (hash << PAGE_SHIFT) + 
-                        (pa & ~PAGE_MASK));
-    if ( (*pent & PAGE_MASK) != (pfn << PAGE_SHIFT) )
-    {
-        *pent = (pfn << PAGE_SHIFT) | __PAGE_HYPERVISOR;
-        __flush_tlb_one(va);
-    }
-    return va;
-}
-#endif
+#endif /* __ASM_DOMAIN_PAGE_H__ */
index 4a8c49976331ff0341b7d5fbf22590f3305a5184..7ca70f41a80c6f5b0059df9b98474a99dd553618 100644 (file)
@@ -206,18 +206,12 @@ extern int *mp_bus_id_to_pci_bus;
 extern int quad_local_to_mp_bus_id [NR_CPUS/4][4];
 
 extern unsigned int boot_cpu_physical_apicid;
-extern unsigned long phys_cpu_present_map;
 extern int smp_found_config;
 extern void find_smp_config (void);
 extern void get_smp_config (void);
-extern int nr_ioapics;
 extern int apic_version [MAX_APICS];
-extern int mp_irq_entries;
-extern struct mpc_config_intsrc *mp_irqs;
-extern int mpc_default_type;
 extern int mp_current_pci_id;
 extern unsigned long mp_lapic_addr;
-extern int pic_mode;
 
 #endif
 
index 08eef3c8bdea3eac4280f74412dd6c2bd44fb856..58a0a24d3095894198de102392e451c944abea83 100644 (file)
@@ -54,7 +54,6 @@ extern volatile int logical_apicid_to_cpu[MAX_APICID];
  * General functions that each host system must provide.
  */
  
-extern void smp_boot_cpus(void);
 extern void smp_store_cpu_info(int id);                /* Store per CPU info (like the initial udelay numbers */
 
 /*
index 13e9378f55d57271665e5c8d8f3d847bc71f541d..438cc80b835dac08e4d73ea2e442af3192f48067 100644 (file)
@@ -14,6 +14,4 @@
 #define SCSICAM_H
 #include <xeno/kdev_t.h>
 extern int scsicam_bios_param (Disk *disk, kdev_t dev, int *ip);
-extern int scsi_partsize(struct buffer_head *bh, unsigned long capacity,
-           unsigned int  *cyls, unsigned int *hds, unsigned int *secs);
 #endif /* def SCSICAM_H */